package com.community.sqlapp.databaseConfiguration;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 创建动态数据源路由类
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDataSourceContextHolder.getDataSourceKey();
    }
}
